		
$('#doc-vld-msg').validator({
	             onValid: function(validity) {
	            $(validity.field).closest('.am-form-group').find('.am-alert').hide();
	            },
			    onInValid: function(validity) {
			        window.parent.iframeLoad();
			      var $field = $(validity.field);
			      var $group = $field.closest('.am-form-group');
			      var $alert = $group.find('.am-alert');
			      // 使用自定义的提示信息 或 插件内置的提示信息
			      var msg = $field.data('validationMessage') || this.getValidationMessage(validity);
			      if (!$alert.length) {
			        $alert = $('<div class="am-alert am-alert-danger"></div>').hide().
			          appendTo($group);
			      }
			      text=msg;
			      $alert.html(msg).show();
			    }
 	  }); 
function ajaxForm(urls){
	var html='	<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert"><div class="am-modal-dialog">'
	+'<div class="am-modal-hd">提示</div><div class="am-modal-bd"></div>'	
	+'<div class="am-modal-footer"><span class="am-modal-btn">确定</span></div></div>'	
  	+'</div>';
	/*data-am-modal="{target:'#my-alert'}"*/
	var alert='<span id="aler" type="hidden" ></span>'
		$("#doc-vld-msg").append(alert);
	  $("#aler").attr("data-am-modal","{target:'#my-alert'}");
    var form = new FormData(document.getElementById("doc-vld-msg"));
    $.ajax({
        url:urls,
        type:"post",
        data:form,
        dataType : 'json',
        processData:false,
        contentType:false,
        cache : false,
		async : false,
		success : function(data) {
			console.log(13333);
			$("body").append(html);
			console.log(data.message);
			$(".am-modal-bd").text(data.message);
			 if (data.statusCode == 200) {
				 setTimeout("location.reload();",2000);
				 $("#aler").click();
               
            
			}else{
				 $("#aler").click();
			} 
			  
		},
		error : function(data) {
			$(".am-modal-bd").text("请求失败");
			$("#aler").click();
		}
    }); 
}
/*		$(document).ready(function() {
	 		$('#doc-vld-msg').submit(function() {
	 			  var num =  $(".am-field-error").length; 
	 			if(num==0){
 					$.ajax({
						type : "POST",
						url : "${ctx}/user/create",
						data : $("#doc-vld-msg").serialize(),
						cache : false,
						async : false,
						success : function(data) {
							console.log(13333);
							$(".am-modal-bd").text(data.message);
							 if (data.statusCode == 200) {
								 setTimeout("location.reload();",2000);
								 $("#aler").click();
	                           
	                        
							}else{
								 $("#aler").click();
							} 
							  
						},
						error : function(data) {
							$(".am-modal-bd").text("请求失败");
							$("#aler").click();
						}
					});
	 			}
	 			return false;
			}); 
		});*/